<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="static/logo.svg">
    <script>
      const coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)')
  || CSS.supports('top: constant(a)'))
      document.write(
        `<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0${
  coverSupport ? ', viewport-fit=cover' : ''}" />`)
    </script>
    <script>
      // 自定义路由重定向
      (function() {
        const routeMap = {
          '/home': '/pages/index/index',
          '/tasks': '/pages/tasks/index',
          '/profile': '/pages/users/profile',
          '/login': '/pages/login/login',
          '/wallet': '/pages/wallet/account',
          '/team': '/pages/team/index',
          '/fenxiao': '/pages/fenxiao/index',
          '/search': '/pages/index/search',
          '/orders': '/pages/order/orderlist',
          '/shop': '/pages/shop/orderlist',
          '/notice': '/pages/notice/message',
          '/realname': '/pages/realname/index',
          '/router-test': '/pages/test/router-test'
        }
        
        const currentPath = window.location.pathname
        
        // 如果当前路径在映射表中，重定向到对应的页面
        if (routeMap[currentPath]) {
          const newPath = routeMap[currentPath]
          // 使用 history.replaceState 避免在浏览器历史中留下记录
          window.history.replaceState(null, '', newPath + window.location.search + window.location.hash)
        }
      })()
    </script>
    <title></title>
    <!--preload-links-->
    <!--app-context-->
  </head>
  <body>
    <div id="app"><!--app-html--></div>
    <script type="module" src="/src/main.js"></script>
  </body>
</html>
